package cn.ithers.blog.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name = "tb_refresh_token")
public class RefreshToken implements Serializable {

    @ApiModelProperty(value = "刷新tokenID")
    @Id
    private String id;

    @ApiModelProperty(value = "刷新的token名")
    @Column(name = "refresh_token")
    private String refreshToken;

    @ApiModelProperty(value = "用户ID")
    @Column(name = "user_id")
    private String userId;

    @ApiModelProperty(value = "token的key")
    @Column(name = "token_key")
    private String tokenKey;

    @ApiModelProperty(value = "移动端的token_key")
    @Column(name = "mobile_token_key")
    private String mobileTokenKey;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time")
    private Date creatTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "update_time")
    private Date updateTime;


}
